
// process.env 好像没有作用

module.exports = {
    development: {
        username: process.env.APP_MYSQL_USERNAME || 'root',
        password: process.env.APP_MYSQL_PASSWORD || 'root',
        database: process.env.APP_MYSQL_DATABASE || 'test',
        host: process.env.APP_MYSQL_HOST || '127.0.0.1',
        port: process.env.APP_MYSQL_PORT || 3306,
        pre: process.env.APP_MYSQL_PRE || 'pre',
        dialect: 'mysql',
        dialectOptions: {
            bigNumberStrings: true
        }
    },
    test: {
        username: process.env.APP_MYSQL_USERNAME || 'root',
        password: process.env.APP_MYSQL_PASSWORD || 'root',
        database: process.env.APP_MYSQL_DATABASE || 'test',
        host: process.env.APP_MYSQL_HOST || '127.0.0.1',
        port: process.env.APP_MYSQL_PORT || 3306,
        pre: process.env.APP_MYSQL_PRE || 'pre',
        dialect: 'mysql',
        dialectOptions: {
            bigNumberStrings: true
        }
    },
    production: {
        username: process.env.APP_MYSQL_USERNAME || 'root',
        password: process.env.APP_MYSQL_PASSWORD || 'root',
        database: process.env.APP_MYSQL_DATABASE || 'test',
        host: process.env.APP_MYSQL_HOST || '127.0.0.1',
        port: process.env.APP_MYSQL_PORT || 3306,
        pre: process.env.APP_MYSQL_PRE || 'pre',
        dialect: 'mysql',
        dialectOptions: {
            bigNumberStrings: true,
            // ssl: {
            //     ca: fs.readFileSync(__dirname + '/mysql-ca-main.crt')
            // }
        }
    }
};